﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="hotellist.aspx.vb" Inherits="hotels.hotellist" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <p>
    <br />
</p>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="hotelsDataSource">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" />
            <asp:HyperLinkField DataNavigateUrlFields="HotelUrl" 
                DataNavigateUrlFormatString="{0}" DataTextField="HotelName" 
                HeaderText="Hotel" />
            <asp:HyperLinkField DataNavigateUrlFields="Location" 
                DataNavigateUrlFormatString="http://maps.google.co.uk/maps?q={0}" 
                DataTextField="Location" HeaderText="Location" />
            <asp:BoundField DataField="Stars" HeaderText="Stars" 
                SortExpression="Stars" />
            <asp:BoundField DataField="ContactDetails" HeaderText="ContactDetails" 
                SortExpression="ContactDetails" />
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Pictures">
                <ControlStyle CssClass="image" />
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="hotelinformation.aspx?ID={0}" Text="More Detail" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="hotelsDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:hotelsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:hotelsConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT [ID], [HotelName], [Location], [Stars], [Description], [ContactDetails], [Picture], [HotelUrl] FROM [hotellist]">
    </asp:SqlDataSource>
</p>
<p>
</p>
<p>
</p>
<p>
</p>

</asp:Content>
